<template>
  <!-- default-openeds="['1'] 刚进入菜单默认展示第几个菜单-->
  <el-menu
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b"
      default-active="/Home"
      style="height: 100vh;"
      :collapse="isCollapse"
      :collapse-transition="false"
      router
  >
    <!--新增导航-->
    <el-menu-item index="/Home">
      <i class="el-icon-s-home"></i>
      <span slot="title">首页个人信息</span>
    </el-menu-item>

    <el-menu-item :index="'/' + item.menuClick"  v-for="(item,i) in menu" :key="i">
      <i :class="item.menuIcon"></i>
      <span slot="title">{{item.menuName}}</span>
    </el-menu-item>

  </el-menu>
</template>

<script>
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "Aside",
  data() {
    return {
      // isCollapse: false
      menu: [
        {
          menuClick:'Main',
          menuName:'用户信息',
          menuIcon:'el-icon-s-cooperation'
        },
        {
          menuClick:'User',
          menuName:'卫星3D检测图',
          menuIcon:'el-icon-s-cooperation'
        },
        {
          menuClick:'Admin',
          menuName:'导航测试页Num1',
          menuIcon:'el-icon-s-promotion'
        },
        {
          menuClick:'BigScreen',
          menuName:'大屏展示数据',
          menuIcon:'el-icon-s-cooperation'
        },
      {
          menuClick:'WebSocketDemo',
          menuName:'webSocket页面',
          menuIcon:'el-icon-s-cooperation'
      }
      ]
    }
  },
  props: {
    isCollapse: Boolean
  }
}
</script>

<style scoped>

</style>